Field of the Invention
The present invention relates to a device for determining rhythm units in a musical piece, and it also relates to a method and a device for determining rhythm units in musical pieces on the basis of digital audio data.
Devices for determining rhythm units in a musical piece actually determine the beats per minute in a musical piece or the tempo of the musical piece, and are also known as BPM detectors (where BPM stands for beats per minute). Such devices are used in the most diverse sectors of the music business. Disk jockeys may wish to measure the tempo of two different music sources to be able to coordinate their tempos. In MIDI applications, the BPM detector is used to synchronize the speed of a MIDI event sequencer with an existing audio track. In a music database system, it is possible, for example, to characterize music by rhythm units and to assign it indices based on its BPM value.
Thus, real-time implementations of devices for determining rhythm units have usually been based on the principles of autocorrelation and on the principles of a variable threshold.
Unfortunately, these two principles cannot determine beats greater than 5 to 6 rhythm units (BPM).
One object of the present invention is to provide a method for determining rhythm units in digital audio data and a device for performing the method, to ensure faster determination than in the past, together with high determination accuracy.
The invention relates to a method and a device that permits a determination accuracy of up to xc2x10.1 rhythm units (BPM) after a measurement time of just three periods and a speed of 3 rhythm units (BPM). When the inventive method and the inventive device are used for disk jockey applications, the range of rhythm periods to be measured preferably corresponds to 60 to 160 rhythm units (BPM).
More specifically, the invention relates to a device having a plurality of parallel processing blocks or determination paths, through all of which the digital or digitized audio signal passes. At the output of the parallel determination paths, a logic circuit selects that determined value of rhythm units which represents the most plausible measurement, and this determination result is preferably indicated optically on a suitable display.
More specifically, each determination path monitors a very narrow frequency band, which is obtained from the total frequency band of the audio data by bandpass filters. A transient detector is connected downstream from the respective bandpass filter and is used to check the attack events for transients. The time interval occurring between two successive attack events (transients) is measured and analyzed by a periodicity detector, whereupon an averaged resultant BPM value is displayed.
More specifically, the invention provides, a method for determining rhythm units (BPM) in (digital) audio data. This audio data is split among a plurality of determination paths,
a) wherein this data is subdivided into predetermined frequency bands,
b) wherein the data is analyzed for transients to determine attack events,
c) wherein the time intervals between two successive attack events are measured,
d) wherein the time intervals are averaged and defined as the frequency-band-specific rhythm unit (BPM) of the audio data in the respective determination path, and wherein that rhythm unit which exhibits the highest beat number (BPM number) which is selected from the frequency-band-specific rhythm units (BPM) of the determination paths.
As already mentioned herein above, the determined rhythm unit (BPM) is preferably indicated optically.
The frequency bands for step a) are preferably extremely narrow or are selected with high Q.
Since the center frequency of the instruments that set the rhythm unit in musical pieces lies at a very high and/or a very low end of the audio frequency spectrum, the frequency bands of the individual determination paths are selected accordingly.
To measure the transients in step b), the maximum average energy of the audio signal in the frequency band of the respective determination path is determined as a function of time tw. Thus, the amplitude of the audio signal in a time window of predetermined length is squared and averaged for determination of its energy in the frequency band of the respective determination path. Preferably, the time window is a rectangular integration window. The squared amplitude of the audio data is preferably delayed by a delay element, and subtracted from the input signal of the delay line and summed using a further delay element, to obtain the rectangular integration window that measures the average energy in the frequency band as a function of time tw. To ensure an overlapping sequence of successive time windows, the time windows of successive energy-determination values are preferably scaled with a constant factor c and output with constant time intervals ts (ts less than tw).
From the determined energy values, a local maximum is preferably calculated. For this calculation a linear regression is used to determine the maximum average energy of the audio data. As the local maximum, there is calculated an energy value which is larger than a defined number of preceding energy values and a defined number of subsequent energy values. In addition, for the local maximum, the energy value in question must be larger than a minimum energy level or a separately determined threshold value.
Since the rhythm unit determined in the individual determination paths as explained herein above can also be, one quarter or one half or double the sought rhythm unit, the determined rhythm unit is restored to a basic rhythm unit by scaling as disclosed in step d), hereinabove. Thus, no multiple of the basic rhythm unit is output as the rhythm-unit determination result.
The present invention provides a device for determining the rhythm unit (BPM) in digital audio data by performing the inventive method, the device has an input to which the audio data is applied and with an output at which the determined rhythm unit is output. The determination device has a plurality of rhythm-unit detectors (BPM detectors), which are connected in parallel between the input and a logic circuit upstream from the output. The rhythm-unit detectors comprises a plurality of components:
These components can include a bandpass filter for separating a frequency range from the audio signal present at the input. The bandpass filters of the rhythm-unit detectors cover at least part of the total bandwidth of the audio signal. There is also a transient detector for determining attack events and a timer for measuring the time intervals between two successive attack events. There is also a periodicity detector for averaging the time intervals and defining the averaged time intervals as a frequency-band-specific rhythm unit (BPM) of the audio data in the respective determination path. In this case, the logic circuit is designed to select from the frequency-band-specific rhythm units (BPM) of the determination paths that which has the highest beat number (BPM number).
For optical indication of the determined rhythm unit (BPM), a display device is preferably connected downstream from the logic circuit.